<div class="categories form">
    <?php echo $this->Form->create('Category'); ?>
    <fieldset>
        <legend><?php echo __('Edit Category'); ?></legend>
        <?php
        echo $this->Form->input('id');
        ?>
        <?php
        $options = array();
        $options[0] = '--Chọn Mục Cha--';
        foreach ($parentCategories as $category)
        {
            $options[$category['Category']['id']] = $category['Category']['name_category'];
        }
        ?>
        <?php echo $this->Form->input('parent_id', array('options' => $options)); ?>
        <?php
        echo $this->Form->input('name_category');
        ?>
    </fieldset>
    <?php echo $this->Form->end(__('Submit')); ?>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>

        <li><?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Category.id')), array(), __('Are you sure you want to delete # %s?', $this->Form->value('Category.id'))); ?></li>
        <li><?php echo $this->Html->link(__('List Categories'), array('action' => 'index')); ?></li>
        <li><?php echo $this->Html->link(__('List Categories'), array('controller' => 'categories', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Parent Category'), array('controller' => 'categories', 'action' => 'add')); ?> </li>
    </ul>
</div>
